package ar.com.spsolutions.splibrary.services;

import java.util.Map;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class QuartzRunner implements Job {

	@Override
	public void execute(final JobExecutionContext context)
			throws JobExecutionException {
		@SuppressWarnings("unchecked")
		final Map<String, Object> dataMap = context.getJobDetail()
				.getJobDataMap();
		final LoanBookService task = (LoanBookService) dataMap
				.get("dueNotifyTask");
		task.notifyDues();
	}

}
